<template> 	
  <div class="page">
	<div class="layui-fluid">
			<div class="layui-row layui-col-space15">
				<div class="layui-col-md12">
					<div class="layui-card">
						
						<div class="layui-card-body">							
							<div class="layui-form" lay-filter="">		
								<div class="layui-form-item">
									<label class="layui-form-label">申请时间 </label>
						      <div class="layui-input-inline">
						      	<input type="text" name="nickName" disabled="disabled"  :value="dotime(itemData.createAt)" class="layui-input a">
						      </div>
								</div>
						    <div class="layui-form-item">
									<label class="layui-form-label">审核时间 </label>
						      <div class="layui-input-inline">
						      	<input type="text" name="nickName" disabled="disabled"  :value="dotime(itemData.authAt)" class="layui-input a">
						      </div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">审核状态 </label>
						      <div class="layui-input-inline">
						      	<input type="text" name="nickName" disabled="disabled"  :value="dostate(itemData.authStatus)" class="layui-input a">
						      </div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">审核人 </label>
						      <div class="layui-input-inline">
						      	<input type="text" name="nickName" disabled="disabled"  :value="itemData.author" class="layui-input a">
						      </div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">驳回原因 </label>
						      <div class="layui-input-inline">
						      	<input type="text" name="nickName" disabled="disabled"  :value="itemData.reson" class="layui-input a">
						      </div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">转账记录id </label>
						      <div class="layui-input-inline">
						      	<input type="text" name="nickName" disabled="disabled"  :value="itemData.entityId " class="layui-input a">
						      </div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">业务订单号</label>
						      <div class="layui-input-inline">
						      	<input type="text" name="nickName" disabled="disabled"  :value="itemData.outTradeNo" class="layui-input a">
						      </div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">卡款凭证 </label>
						      <div class="layui-input-inline">
						      	<img :src='itemData.evidence' style="width:200px">
						      </div>
								</div>
								 
							</div>
						</div>
						
						<div class="layui-card-body" style="border-top:1px solid #eee">							
							<div class="layui-form">
								<div class="layui-form-item">
									<label class="layui-form-label">用户ID</label>
						      <div class="layui-input-inline">
						      	<input type="text" name="nickName" disabled="disabled"  :value="itemData.accountId" class="layui-input a">
						      </div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">用户名称</label>
						      <div class="layui-input-inline">
						      	<input type="text" name="nickName" disabled="disabled"  :value="itemData.accountName" class="layui-input a">
						      </div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">真实姓名</label>
						      <div class="layui-input-inline">
						      	<input type="text" name="nickName" disabled="disabled"  :value="itemData.realName" class="layui-input a">
						      </div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">提现金额 </label>
						      <div class="layui-input-inline">
						      	<input type="text" name="nickName" disabled="disabled"  :value="itemData.assetsAmount/100" class="layui-input a">
						      </div>
								</div>
								
								<div class="layui-form-item">
									<label class="layui-form-label">实际金额 </label>
						      <div class="layui-input-inline">
						      	<input type="text" name="nickName" disabled="disabled"  :value="itemData.amount/100" class="layui-input a">
						      </div>
								</div>
							
								<div class="layui-form-item">
									<label class="layui-form-label">资产申请类型</label>
						      <div class="layui-input-inline">
						      	<input type="text" name="nickName" disabled="disabled"  :value="dozc(itemData.assetsType)" class="layui-input a">
						      </div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">提现方式</label>
						      <div class="layui-input-inline">
						      	<input type="text" name="nickName" disabled="disabled"  :value="dofs(itemData.type)" class="layui-input a">
						      </div>
								</div>
							</div>
						</div>
						
						<div class="layui-card-body" style="border-top:1px solid #eee" v-if="itemData.bank">							
							<div class="layui-form">
								<div class="layui-form-item">
									<label class="layui-form-label">账户 </label>
						      <div class="layui-input-inline">
						      	<input type="text" name="nickName" disabled="disabled"  :value="itemData.bank.account" class="layui-input a">
						      </div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">账户支付类型 </label>
						      <div class="layui-input-inline">
						      	<input type="text" name="nickName" disabled="disabled"  :value="dolx(itemData.bank.bankPaytype)" class="layui-input a">
						      </div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">支行名称 </label>
						      <div class="layui-input-inline">
						      	<input type="text" name="nickName" disabled="disabled"  :value="itemData.bank.branch" class="layui-input a">
						      </div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">真实姓名 </label>
						      <div class="layui-input-inline">
						      	<input type="text" name="nickName" disabled="disabled"  :value="itemData.bank.realname" class="layui-input a">
						      </div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">银行种类 </label>
						      <div class="layui-input-inline">
						      	<input type="text" name="nickName" disabled="disabled"  :value="itemData.bank.bankType.name" class="layui-input a">
						      </div>
								</div>
								
							</div>
						</div>
						
					</div>
				</div>
			</div>
	</div>		
  </div> 
</template>
<script>
export default {	
  name: 'customerdetail',  
  data () {
    return { 
    	id:'',
    	itemData:''
    }
  },
  mounted(){ 
  	var _this = this;   	
	  window.getdates = this.getdates;  
  },
  methods: {  	
		getdates:function(data){		
			var _this = this; 			
			_this.id=data.id;
			var url="/pay/aapi/v1.9/withdrawal-record/"+data.id		
			ajaxRequest(url,'GET','json','',function(ret,err){
				 _this.itemData=ret.data;
			})	
		},
		dotime(time){
			return FormatDate(time)
		},
		dostate(val){
			if(val=='NOTYET'){
				return '待审核'
			}
			else if(val=='FAIL'){
				return '审核不通过'
			}
			else if(val=='PASS'){
				return '审核通过'
			}
			else{
				return '取消'
			}
		},
		dozc(val){
			var str=''
			if(val=='BALANCE_RMB'){
      	str='余额'
      }
      else if(val =='BALANCE_GXJ'){
      	str='共享金'
      }
      else{
      	str='积分'
      }
      return str
		},
		dolx(val){
			if(val=='BANKPAYTYPE_BANK'){
				return '银行'
			}
			else if(val=='BANKPAYTYPE_ALI'){
				return '支付宝'
			}
			else if(val=='BANKPAYTYPE_WEPAY'){
				return '微信'
			}
			else{
				return '取消'
			}
		},
		dofs(type){
			var str=''
      if(type =='BALANCE_RMB'){
      	str='资产现金'
      }
      else if(type =='PROFITSHARING'){
      	str='微信提现'
      }
      else if(type =='OFFLINEPAY'){
      	str='线下打款'
      }
      else{
      	str='转账'
      }
      return str
		}
	},		
		
   updated:function(){
		this.isShow = true;
		var _this=this;
		layui.use('form', function(){
		  var form = layui.form;
		  form.render();
		});
  },

}
</script>
<style scoped>
	.layui-form-label{width:100px}
	.layui-form-item .layui-input-inline{width:70%;}
</style>
